import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {
      path: '/',//登录页面
      name: 'Login',
      component: () => import("../components/Login")
    },
    {
      path: '/test02',
      name: 'Test02',
      component: () => import("../components/Test02")
    },
    {
      path: '*',//通配所有错误的URL地址
      name: 'Error',
      component: () => import("../components/Error")
    },
    {
      path: '/paper',//通配所有错误的URL地址
      name: 'Paper',
      component: () => import("../components/Paper")
    },

    {
      path: '/index',//题库地址
      name: 'Index',
      meta:{"isLogin":true},//表示需要登录才能访问
      component: () => import("../components/Index"),
      children:[
        {
          path: 'question',//题库地址
          name: 'Question',
          component: () => import("../components/Question")
        },
      ]
    }
  ]
})
